#!/usr/bin/bash

export RABBITMQ_SERVER=amqp://admin:admin@10.29.102.173:5672

DIR=..

for i in `seq 1 6`; do
    mkdir -p /tmp/$i/objects

    LISTEN_ADDR=10.29.1.$i:12345 STORAGE_ROOT=/tmp/$i go run $DIR/dataServer/src/main.go &

done


LISTEN_ADDR=10.29.2.1:12345 go run $DIR/apiServer/src/main.go &
LISTEN_ADDR=10.29.2.2:12345 go run $DIR/apiServer/src/main.go &
